<!-- #layout name=blank -->
<div id="app" v-cloak>
  <div class="page-header">
    <h1 class="title">Versions</h1>
  </div>
  <kb-breadcrumb :breads="breads"></kb-breadcrumb>
  <div class="navbar navbar-default">
    <div class="container-fluid">
      <a
        class="btn green navbar-btn"
        v-if="selected.length==1" 
        @click="onUndo"
        >Undo</a
      >
      <a
        class="btn green navbar-btn"
        v-if="selected.length==1"
        :href="compareLink"
        >Compare with current</a
      >
      <a
        class="btn green navbar-btn"
        v-if="selected.length==2"
        :href="compareLink"
        >Compare</a
      >
    </div>
  </div>
  <kb-table :data="tableData" :show-select="true" :selected.sync="selected">
    <kb-table-column
      :label="Kooboo.text.site.siteLog.version"
      prop="version"
    ></kb-table-column>
    <kb-table-column :label="Kooboo.text.common.user">
      <template v-slot="row">
        <span :class="['label', row.user.class]">{{ row.user.text }}</span>
      </template>
    </kb-table-column>

    <kb-table-column
      :label="Kooboo.text.common.date"
      prop="date"
    ></kb-table-column>
  </kb-table>
</div>
<script>
  (function() {
    Kooboo.loadJS([
      "/_Admin/Scripts/components/kbTable.js",
      "/_Admin/Scripts/components/kbBreadcrumb.js"
    ]);
  })();
</script>
<script src="/_Admin/View/System/SiteLog/LogVersions.js"></script>
